{#**
 * 2007-2017 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2017 PrestaShop SA
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *#}
{% set dimension_unit, weight_unit = 'PS_DIMENSION_UNIT'|configuration, 'PS_WEIGHT_UNIT'|configuration %}

<div class="col-md-12 p-b-1">
  <h2>{{ 'Package dimension'|trans({}, 'Admin.Catalog.Feature') }}</h2>
  <p class="subtitle">{{ 'Adjust your shipping costs by filling in the product dimensions.'|trans({}, 'Admin.Catalog.Feature') }}</p>
</div>

<div class="col-xl-2 col-lg-3">
  <div class="form-group">
    <label class="form-control-label">{{ form.width.vars.label }}</label>
    {{ form_errors(form.width) }}
    <div class="input-group">
      {{ form_widget(form.width) }}
      <span class="input-group-addon">{{ dimension_unit }}</span>
    </div>
  </div>
</div>
<div class="col-xl-2 col-lg-3">
  <div class="form-group">
    <label class="form-control-label">{{ form.height.vars.label }}</label>
    {{ form_errors(form.height) }}
    <div class="input-group">
      {{ form_widget(form.height) }}
      <span class="input-group-addon">{{ dimension_unit }}</span>
    </div>
  </div>
</div>
<div class="col-xl-2 col-lg-3">
  <div class="form-group">
    <label class="form-control-label">{{ form.depth.vars.label }}</label>
    {{ form_errors(form.depth) }}
    <div class="input-group">
      {{ form_widget(form.depth) }}
      <span class="input-group-addon">{{ dimension_unit }}</span>
    </div>
  </div>
</div>
<div class="col-xl-2 col-lg-3">
  <div class="form-group">
    <label class="form-control-label">{{ form.weight.vars.label }}</label>
    {{ form_errors(form.weight) }}
    <div class="input-group">
      {{ form_widget(form.weight) }}
      <span class="input-group-addon">{{ weight_unit }}</span>
    </div>
  </div>
</div>

<div class="col-md-12">
  <div class="form-group">
    <h2>
      {{ form.additional_shipping_cost.vars.label }}
      <span class="help-box" data-toggle="popover"
        data-content="{{ "If a carrier has a tax, it will be added to the shipping fees."|trans({}, 'Admin.Catalog.Help') }}" ></span>
    </h2>
    <label class="form-control-label">{{ 'Does this product incur additional shipping costs?'|trans({}, 'Admin.Catalog.Feature') }}</label>
    <div class="row">
      <div class="col-md-2">
        {{ form_widget(form.additional_shipping_cost) }}
      </div>
    </div>
  </div>
</div>

<div class="col-md-12">
  <div class="form-group">
    <h2>{{ form.selectedCarriers.vars.label }}</h2>
    {{ form_widget(form.selectedCarriers) }}
  </div>
</div>

<div class="col-md-12">
  <div class="alert alert-warning" role="alert">
    <i class="material-icons">info_outline</i>
    <p>{{ 'If no carrier is selected then all the carriers will be available for customers orders.'|trans({}, 'Admin.Catalog.Notification')|raw }}</p>
  </div>
</div>

<div class="col-md-12">
  <div id="warehouse_combination_collection" class="col-md-12 form-group" data-url="{{ path('admin_warehouse_refresh_product_warehouse_combination_form') }}">
    {% if asm_globally_activated and isNotVirtual and isChecked %}
      {{ include('PrestaShopBundle:Admin:Product/Include/form-warehouse-combination.html.twig', { 'warehouses': warehouses, 'form': form }) }}
    {% endif %}
  </div>
</div>

{{ renderhook('displayAdminProductsShippingStepBottom', { 'id_product': id_product }) }}
